Replace --persist flag with REPLACE_PLAYLIST .env, Remove stale persist toggles#191
Replace --persist flag with REPLACE_PLAYLIST .env, Remove stale persist toggles#191dammitjeff wants to merge 5 commits into
Conversation
…irst time startup
… and PlaylistCard
| func (cfg *Config) GenPlaylistDetails() { | ||
|
|
||
| cfg.ClientCfg.PlaylistName = getPlaylistName(cfg.Flags.Playlist, cfg.ClientCfg.PlaylistNFormat, cfg.Persist) | ||
| cfg.ClientCfg.PlaylistName = getPlaylistName(cfg.Flags.Playlist, cfg.ClientCfg.PlaylistNFormat, cfg.ReplacePlaylist) |
There was a problem hiding this comment.
PERSIST was originally a .env toggle. I switched it to a flag to give users more control over playlist creation (e.g., keep weekly exploration playlists while replace daily jams).
The naming could've been better I agree 😅
I think it would make sense if the option stayed as a flag (renamed to --replace for example?). (It currently logs that --replace is deprecated)
Users can then still configure their schedules in settings and decide, on a playlist basis, whether they should be replaced or kept.
In the future we can polish it when we move to a more UI-centric settings page
There was a problem hiding this comment.
This is just a general comment. I noticed that the code still uses the --replace flag when it's set, so the deprecation notice is what irked me 😄
There was a problem hiding this comment.
That's a really good idea tbh, we could totally make it playlist specific and keep it as a flag. Okay, yeah let me see what I can do
Also yeah I'll remove the --replace depreciation notice lol
PERSIST was incredibly confusing for users and devs to understand whats going on, and made it difficult to debug features since true meant "don't delete" false meant "delete and replace." The UI already had to double-invert just for it to make sense for end-users. Not good lol.
Swapped out the
--persistflag with a new env, and wired it up to thesettings.jsxpage.REPLACE_PLAYLIST=true- Delete old playlist, Create new one (this is now default)REPLACE_PLAYLIST=false- Keep old playlist, Create new one alongside old playlistAlso added a one time migration in
server.goto help convert existing "persist" values for anyone that was already using it, on startup. Will delete at a later date once people are migrated over.Also removed stale --persist toggles in the frontend as they're now redundant with the toggles in settings.